home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 2002 November / SGI IRIX Base Documentation 2002 November.iso / usr / share / catman / p_man / cat3 / f90 / unit.z / unit
Encoding:
Text File  |  2002-10-03  |  4.1 KB  |  100 lines

  1. UNIT(3I)                                              Last changed: 4-13-99
  2.  
  3.  
  4. NNAAMMEE
  5.      UUNNIITT - Returns the status of a BBUUFFFFEERR IINN or BBUUFFFFEERR OOUUTT statement
  6.  
  7. SSYYNNOOPPSSIISS
  8.      UUNNIITT (([II==]_i))
  9.  
  10. IIMMPPLLEEMMEENNTTAATTIIOONN
  11.      UNICOS, UNICOS/mk, IRIX systems
  12.  
  13.      CF90, MIPSpro 7 Fortran 90
  14.  
  15. SSTTAANNDDAARRDDSS
  16.      Fortran extension
  17.  
  18. DDEESSCCRRIIPPTTIIOONN
  19.      After execution of asynchronous I/O with a BBUUFFFFEERR IINN or BBUUFFFFEERR OOUUTT
  20.      statement, the execution sequence continues concurrently with the data
  21.      transfer.  If UUNNIITT is called in this execution sequence, the sequence
  22.      is delayed until the transfer is complete.  After the BBUUFFFFEERR IINN
  23.      operation, use UUNNIITT or LLEENNGGTTHH(3I) before using memory locations where
  24.      the data is stored.  UUNNIITT accepts the following argument:
  25.  
  26.      _i         Must be an integer or Boolean value.  Represents a unit
  27.                number.
  28.  
  29.      UUNNIITT is an elemental function.  The name of this intrinsic cannot be
  30.      passed as an argument.
  31.  
  32. NNOOTTEESS
  33.      On UNICOS and UNICOS/mk systems, UUNNIITT can be called as either an
  34.      external subprogram or as an intrinsic procedure.
  35.  
  36.      On IRIX systems, the BBUUFFFFEERR IINN and BBUUFFFFEERR OOUUTT statements are used for
  37.      synchronous I/O.  Asynchronous I/O is not available through BBUUFFFFEERR I/O
  38.      on IRIX systems.
  39.  
  40. RREETTUURRNN VVAALLUUEESS
  41.      When the transfer is complete, UUNNIITT returns a value of type real.  The
  42.      value is of type RREEAALL((KKIINNDD==88)) on UNICOS and UNICOS/mk systems; it is
  43.      of type RREEAALL((KKIINNDD==44)) on IRIX systems.  The returned value has one of
  44.      the following meanings:
  45.  
  46.      VVaalluuee     MMeeaanniinngg
  47.  
  48.      -2.0      A partial-record read terminated after delivering the
  49.                requested number of words or characters, but more data
  50.                remains in the record.  This status can be received only
  51.                after a BBUUFFFFEERR IINN in partial record mode.
  52.  
  53.      -1.0      Operation was completed (indicates one of the following):
  54.  
  55.                * A full- or partial-record BBUUFFFFEERR OOUUTT operation completed.
  56.  
  57.                * A full-record BBUUFFFFEERR IINN completed, transferring as much of
  58.                  the record as would fit in the space provided.
  59.  
  60.                * A partial-record BBUUFFFFEERR IINN completed, transferring as much
  61.                  data as was left in the record (no more data remains in
  62.                  the record).
  63.  
  64.                * UUNNIITT was called for an unconnected unit or for a unit on
  65.                  which no BBUUFFFFEERR IINN or BBUUFFFFEERR OOUUTT operations have been
  66.                  performed.
  67.  
  68.      0.0       An end-of-file was encountered on the previous BBUUFFFFEERR IINN
  69.                operation.  No data was transferred.
  70.  
  71.      1.0       A partially recovered error occurred on the previous BBUUFFFFEERR
  72.                IINN operation.  Use the LLEENNGGTTHH function to determine how much
  73.                data was transferred.
  74.  
  75.      2.0       An unrecovered error occurred on the last BBUUFFFFEERR IINN or
  76.                BBUUFFFFEERR OOUUTT operation.
  77.  
  78. EEXXAAMMPPLLEESS
  79.           PROGRAM TESTUNIT
  80.           DIMENSION M(200,5)
  81.           BUFFER IN(32,0) (M(1,1),M(200,5))
  82.           IF (UNIT(32) .EQ. -1.0) THEN
  83.              DO J = 1,5
  84.                DO I = 1,200
  85.                  M(I,J) = M(I,J)*2
  86.                END DO
  87.              END DO
  88.              BUFFER OUT (22,0) (M(1,1),M(200,5))
  89.              IF (UNIT(22) .NE. -1.0) CALL ABORT
  90.           ELSE
  91.              CALL ABORT
  92.           ENDIF
  93.           END
  94.  
  95. SSEEEE AALLSSOO
  96.      LLEENNGGTTHH(3I)
  97.  
  98.      _I_n_t_r_i_n_s_i_c _P_r_o_c_e_d_u_r_e_s _R_e_f_e_r_e_n_c_e _M_a_n_u_a_l for the printed version of this
  99.      man page.
  100.